(function () {
    'use strict';
    angular.module('module.business')
        .controller('EditController', EditController);
    EditController.$inject = ['$rootScope', '$scope', '$filter', '$uibModal', '$http', '$state','$uibModalInstance', 'i18nService'];

    function EditController($rootScope, $scope, $filter, $uibModal, $http, $state, $uibModalInstance, i18nService) {
        var vm = $scope;
        vm.activate = activate;     //初始化
        vm.cancel = cancel;//关闭弹窗
        vm.save = save;

        activate();
        return vm;


        function activate() {

        }

        /**
         * 保存
         */
        function save() {
            swal({
               title:'提示',
            text:'保存成功',
            type:'success'
            });
            cancel();
        }
        /**
         * 关闭弹窗
         */
        function cancel() {
            $uibModalInstance.dismiss('cancel');
        }
    }
})();